package com.bruce.rentHouse.exception;


import com.bruce.rentHouse.restFul.ResultStatus;

/**
 * 自定义全局异常
 */
public class GlobalException extends RuntimeException {
    private Integer code;

    public GlobalException(ResultStatus resultStatus) {
        super(resultStatus.getMessage());
        this.code = resultStatus.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
